home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickDraw3D 1.6 SDK / Mac SampleCode Previous / Geometry Samples- Mac / BoxMooV / sources / BoxPaint_utility.c < prev   
Encoding:
C/C++ Source or Header  |  1999-05-18  |  1.4 KB  |  72 lines  |  [TEXT/CWIE]

  1. /*  utility.c                                                                            
  2.  
  3.     Nick Thompson
  4.     Michael Bishop - August 21 1996                                                    
  5.     (c)1994-96 Apple computer Inc., All Rights Reserved                                
  6.  
  7. */
  8.  
  9. /* --------------------------------------------------------------------
  10. ** INCLUDES
  11. */
  12. #include    <QuickDraw.h>
  13. #include    <Events.h>
  14.  
  15. #include    "BoxPaint_utility.h"
  16.  
  17.  
  18. /* --------------------------------------------------------------------
  19. ** GLOBAL VARIABLES
  20. */
  21.  
  22.  
  23. /* --------------------------------------------------------------------
  24. ** LOCAL FUNCTION DEFINITIONS
  25. */
  26.  
  27.  
  28. /*    --------------------------------------------------------------------
  29. **    Utility_HiWrd
  30. **    DESCRIPTION
  31. */
  32. short Utility_HiWrd(long aLong)
  33. {
  34.     return    (((aLong) >> 16) & 0xFFFF) ;
  35. }
  36.  
  37. /*    --------------------------------------------------------------------
  38. **    Utility_LoWrd
  39. **    DESCRIPTION
  40. */
  41. short Utility_LoWrd(long aLong)
  42. {
  43.     return    ((aLong) & 0xFFFF) ;
  44.  
  45. }
  46.  
  47.  
  48. /*    --------------------------------------------------------------------
  49. **    Utility_MyGetMouse
  50. **    Abstract GetMouse Function for Porting
  51. */
  52. void Utility_MyGetMouse(TQ3Point2D *thePoint)
  53. {
  54.     Point macPoint;
  55.     
  56.     GetMouse(&macPoint);
  57.     
  58. /*    GlobalToLocal(&macPoint);
  59. */    
  60.     thePoint->x = (float)(macPoint.h);
  61.     thePoint->y = (float)(macPoint.v);
  62. }
  63.  
  64. /*    --------------------------------------------------------------------
  65. **    Utility_MyStillDown
  66. **    Abstract StillDown Function for Porting
  67. */
  68. int    Utility_MyStillDown(void)
  69. {
  70.     return StillDown();
  71. }
  72.